<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数据代理-Object.defineProperty</title>
    <!-- 开发环境版本，包含了有帮助的命令行警告 -->
<script src="vue.js"></script>
</head>
<body>
    <div id="root">
        <h1>学校名称：{{name}}</h1>
    </div>
   <script type="text/javascript">

let number = 19
   let person = {
    name: '张三',
    sex: '男'
   }

   Object.defineProperty(person,'age',{
    get: function() {
        return number
    }
   })
   console.log(person);
   console.log(Object.keys(person));
   </script>
</body>
</html>